import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Borrow from '@/views/Borrow.vue'
import User from '@/views/User.vue'
import System from '@/views/System.vue'
import Home from '@/views/Home.vue'
import Book from '@/views/Book.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '图书管理',
    component: Home
  },
  {
    path: '/book',
    name: '图书管理',
    component: Book
  },
  {
    path: '/login',
    name: '登录界面',
    component: Login
  },
  {
    path: '/borrow',
    name: '借阅中心',
    component: Borrow
  },
  {
    path: '/user',
    name: '用户管理',
    component: User
  },
  {
    path: '/system',
    name: '系统设置',
    component: System
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
